<template>
  <div class="home-order-box">
    <el-table :data="tableData" style="width: 100%">
        <el-table-column type="index"></el-table-column>
      <el-table-column prop="name" label="品牌"></el-table-column>
      <el-table-column prop="todayBuy" label="今日购买"></el-table-column>
      <el-table-column prop="monthBuy" label="本月购买"></el-table-column>
      <el-table-column prop="totalBuy" label="总购买"></el-table-column>
    </el-table>
  </div>
</template>

<script>
import { getTableData } from "@/api/home";
export default {
  name: "orderTable",

  data() {
    return {
      tableData: [],
    };
  },

  mounted() {
    getTableData().then((res) => {
      if (res.status !== 200)
        return this.$message.error("获取首页表格数据失败！！");
      else return (this.tableData = res.data.tableData);
    });
  },

  methods: {},
};
</script>

<style lang="less" scoped>
</style>